package cn.zhukelili.base;

/**
 * @description: 具体工厂类
 * @author: hhbeast
 * @since: 2018/7/29 13:36
 */
public class ConcreteCreator extends Creator {
    public <T extends Product> T createProduct(Class<T> c) {
        Product product = null;
        try {
            product = (Product) Class.forName(c.getName()).newInstance();
        } catch (Exception e) {
//异常处理
        }
        return (T) product;
    }
}
